
package shovelsoft.btmetaparser.tokens;

/***
 * A List token marks the beginning of a list structure ( Mixed array of all other data and structures )
 * @author cds
 */
public class List implements IToken {

	/***
	 * List is a state-less token, only one instance required
	 */
	private static final List singleton = new List();
	
	/***
	 * Private constructor, End is state-less, see getInstance();
	 */
	private List() {
	}
	
	/***
	 * Get access to a List instance.
	 */
	public static List getInstance() {
		
		return singleton;
	}
	
	/***
	 * Accept a visit from a token parser (double dispatch)
	 * @param tp Token Parser
	 */
	@Override
	public void accept(ITokenParser tp) throws Exception {
		
		tp.visit(this);
	}
	
	@Override
	public String toString() {
		
		return "LIST {";
	}
}

